SpatialStream® Code Examples

Simple Click Identify

This example shows how to add click identify capability to the parcel layer in your application using the
GetByGeometry functional component. When the map is clicked, an "click" event is triggered and a GetByGeometry
query constructed using the latitude longitude values at the click location. The returned result includes the
geometry of the parcel at the click location, which is used to highlight the parcel geometry on the map.

GetByGeometry

var sourceUrl = Dmp.Env.Connections["SS"].getBaseUrl() + "getByGeometry.aspx?returnGeoType=1&dataSource=samplesite.dmp/parcels&output=geojson&Geo=POINT("
+ e.latlng.lng + " " + e.latlng.lat + ")";
Dmp.Env.Connections["SS"].getJson(sourceUrl, successCallback, errorCallback);


Run Sample   Back To Index